<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .red{
            background: red;
        }
        .green{
            background: green;
        }
        .test{
            width: 100px;
            height: 100px;
            border: 1px solid;
        }
    </style>
</head>
<body>
    <div id="app">
        <!--
            字符串 : `test red`
            对象  : {test:true,red:false}
            数组  : [字符串,对象]
        -->
        <div :class="[`test`,{green:true}]">

        </div>
    </div>
</body>
<script src="../../js/vue.js"></script>
<script>
    new Vue({
        el:"#app"
    })
    
</script>
</html>